#include <stdio.h>
extern long poweroftwo(long*, long);
void cpoweroftwo(long* r, long l) {
	int i;
	long x=1;
	for (i=0; i<l; i++) {
		r[i]=x;
		x=x*2;
	}
}
int test() {
	#define SIZE 60
	long carr[SIZE];
	long arr[SIZE];
	cpoweroftwo(carr,SIZE);
	poweroftwo(arr,SIZE);
	int i;
	for (i=0;i<SIZE;i++) {
		if (arr[i]!=carr[i]) {
			printf("ERROR: Expected 2^%d=%ld but got %ld\n",i,carr[i],arr[i]);
			return 0;
		}
	}
	return 1;
}
RET( test() == 1 );
